{% extends "book/template.html" %}

{% block container %}
    <div class="row">
        <div class="page-header ">
            <div class="col-md-8 col-md-offset-2">
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">编辑书籍信息</h3>
                    </div>
                    <div class="panel-body">
                        <form class="form-horizontal" action="" method="post" novalidate>
                            {% csrf_token %}
                            {% for field in book %}
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">{{ field.label }}</label>
                                    <div class="col-sm-9"> {{ field }} </div>
                                    <div class="col-sm-11">
                                        <span class="tips">{{ field.errors.0 }}</span>
                                    </div>
                                </div>
                            {% endfor %}
                            <div class="form-group">
                                <div class="col-sm-offset-5 col-sm-6">
                                    <input type="submit" class="btn btn-default pull-right">
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock container %}